﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace FileUploader {
    public partial class DragTest : UserControl {
        public DragTest() {
            InitializeComponent();
            myListBox.Loaded += new RoutedEventHandler(DragTest_Loaded);
        }

        void DragTest_Loaded(object sender, RoutedEventArgs e){
            getData();
        }

        private void getData(){
            var data = new List<DragTestItem>{
                                                 new DragTestItem{ItemName="Goodby"},
                                                 new DragTestItem{ItemName = "Cruel"},
                                                 new DragTestItem{ItemName = "World"}
                                             };
            myListBox.ItemsSource= data;
        }

        public class DragTestItem : DependencyObject {
            public string ItemName { get; set; }
            public string Description { get; set; }
            public override string ToString() {
                return ItemName;
            }
        }
    }
}
